import Vue from 'vue'
import App from './App.vue'
import router from '@/router'
import store from '@/store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';


Vue.use(ElementUI);

Vue.config.productionTip = false



import '@/mock/server'

//测试函数能否接受到数据
// import {reqGetBannerList} from '@/api'
// let result = reqGetBannerList()
// console.log(result)
import TypeNav from '@/components/TypeNav'
Vue.component(TypeNav.name,TypeNav)
//引入swiper需要的样式，项目中用到的有很多，在入口文件引入一次即可
import 'swiper/css/swiper.css'
import Carousel from '@/components/Carousel'
Vue.component(Carousel.name,Carousel)
import Pagination from '@/components/Pagination'
Vue.component(Pagination.name,Pagination)

//引入全部的请求函数
import * as API from '@/api'


import { Button,MessageBox} from 'element-ui';
Vue.component(Button.name, Button);

Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;

//引入图片懒加载
import VueLazyload from 'vue-lazyload'
import liuyifei from '@/assets/images/2.gif'
Vue.use(VueLazyload, {
 
  loading: liuyifei,
  
})






new Vue({
 beforeCreate(){
  Vue.prototype.$bus = this;
  Vue.prototype.$API = API;

 },
  render: h => h(App),
  router,
  store,
}).$mount('#app')





